<ui:composition template="templates/template.xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui">
    <ui:define name="menu">
        <script src="public/js/sha512-min.js" type="text/javascript"></script>
        <ul>
            <fieldset><legend><h3>Login</h3></legend>
                <h:form id="login">
                    <ul>
                        <h:outputText value="Nome de usuário: " /><h:inputText value="#{loginBean.usuario.login}" required="true" requiredMessage="Login Obrigatorio" />
                        <br/>
                        <h:outputText value="Senha: " /><p:password minLength="4" promptLabel="Digite uma senha segura" weakLabel="Razoavel" goodLabel="Boa" strongLabel="Excelente" required="true" requiredMessage="Senha obrigatoria" id="password" onchange="document.getElementById('login:attpass').value = hex_sha512(document.getElementById('login:password').value)" feedback="false" /><h:inputHidden id="attpass" value="#{loginBean.usuario.senha}" />
                        <br/>
                        <h:commandButton value="Entrar" action="#{loginBean.doLogin}" />
                    </ul>
                </h:form>
            </fieldset>
        </ul> 
        <!-- /.mainmenu -->
    </ui:define>
</ui:composition>